#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>

int main()
{
    int k = 0;
    scanf("%d", &k);
    char arr[100][100] = { 0 };
    int i = 0;
    while (1)
    {
        scanf("%s", arr[i]);
        if (strcmp(arr[i], "End") == 0)
        {
            break;
        }
        i++;
    }
    int count = 0;
    for (int j = 0; j < i; j++)
    {
        count++;
        if (count % 3 == 0)
            printf("%s\n", arr[j]);
        else
        {
            if (strcmp(arr[j], "JianDao") == 0)
                printf("%s\n", "ChuiZi");
            else if (strcmp(arr[j], "ChuiZi") == 0)
                printf("%s\n", "Bu");
            else if (strcmp(arr[j], "Bu") == 0)
                printf("%s\n", "JianDao");
        }
    }
    return 0;
}